package club.riven.controller;

import club.riven.manager.RedissonManager;
import org.redisson.api.RBucket;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author 陈浩
 * @date 2021/12/9
 */
@RestController
public class RedissonController {


    @GetMapping("/get")
    public String get(){
        RBucket<Student> bucket = RedissonManager.getClient().getBucket("student");
        bucket.set(Student.of(24, "陈浩"));
        Student student = bucket.get();
        System.out.println(student);
        return "";
    }

}
